package com.juku2024.juku.db.dao;


import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.juku2024.juku.db.entity.VideoRecommendModel;

@Dao
public interface VideoRecommendDao {

    @Query("SELECT * FROM videoRecommend WHERE genreId=:genreId")
    VideoRecommendModel query(long genreId);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(VideoRecommendModel entity);

    @Update(onConflict = OnConflictStrategy.REPLACE)
    int update(VideoRecommendModel entity);

    @Query("DELETE FROM videoRecommend WHERE genreId=:genreId")
    void delete(long genreId);

}
